home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PNTRCODE.ARJ
/
PNTRCODE.DOC
< prev
Wrap
Text File
|
1992-08-16
|
7KB
|
140 lines
PNTRCODE.DOC
Requirements: PNTRCODE has been checked with DOS 3.2, 3.3 and
5.0. It should probably work with DOS 2.0 or newer but all have
not been checked. A color display is required. It is not known
if PNTRCODE will run with a B&W display.
********
PNTRCODE, a user friendly printer code sequence generator,
was developed primarily for the owner of a new printer, be it a
dot matrix, ink-jet or laser. The owner reads the manual and
soon discovers that specific code sequences must be sent to the
printer to select certain features such as margins, fonts, form
feed, etc. And to further complicate the matter, most of the
codes require an "escape" character (i.e. - 1B hex or 027
decimal) which is not the easiest character to output to the
printer.
It should be mentioned that as the new printer owner becomes
more experienced, he will utilize software that through set-up
procedures will automatically transmit the proper code sequences
to the printer. In addition, there are many "pop-up" menu
programs available for the more common printers. However, for
checkout and for familiarization of a new printer, an easy method
of selecting printer functions would be helpful.
PNTRCODE was designed for this scenario. PNTRCODE will
prompt the operator for the desired sequence codes. The output
of PNTRCODE is a "_.COM" file that can be called up as a stand
alone command from DOS (after the DOS prompt) or as a command in
a Batch file. The "_.COM" file, when run, will send the selected
code sequence to the LPT1 (or PRN) port and thus to the printer.
Use of PNTRCODE is best illustrated with an example.
Suppose it is desired to set up an EPSON dot-matrix printer to
print an ASCII file with a left margin of 5 spaces. Checking the
EPSON manual shows that a code sequence must be sent to the
printer that contains the following codes:
ASCII Characters ESCAPE l 5
Decimal 27 108 53
Insure that both PNTRCODE files (CODEGEN.EXE and
PNTRCODE.BAT) are located in the DOS directory that includes the
DOS file DEBUG.EXE (or DEBUG.COM if appropriate) file or that the
path statement includes a path to the DOS directory and DEBUG.
Call up PNTRCODE from the DOS command line (after the DOS prompt)
by typing "PNTRCODE" (without the quotes) followed by pressing
the enter key (<ENTER> will be used here to indicate that the
"ENTER" key should be pressed). A menu box will appear that
prompts for a name for the to-be-generated "_.COM" file. Only 8
alphanumeric characters are permitted. For this example an
appropriate filename "LEFTMARG" could be typed, followed by
<ENTER>. Additional information will appear on the menu and the
program will prompt for the first code. For this example, the
first code is "ESCAPE" and this can be selected in one of 2 ways.
The operator may press the "ESCAPE" key and then <ENTER>. The
display will indicate that ESCAPE (shown as ESC) has been
selected, and in addition will show that "ESCAPE" has a hex code
of "1B" and an ASCII decimal code of "27". The "ESCAPE" code can
also be selected by typing "27" (without quotes) followed by
<ENTER>. The results are identical.
NOTE: PNTRCODE is not designed to accept HEX codes. One-
character codes followed by <ENTER> will be accepted as ASCII
characters. That is "e" will result in an ASCII code of 101 and
a hex code of 65. "2" will result in an ASCII code of 50 and a
hex code of 32. 2 or 3 character codes will be accepted as ASCII
codes. "65" will be accepted as character "A" and hex code 41.
An alpha character (i.e. - a,X,Q, etc) will NOT be accepted as
part of a 2 or 3 character code. If a single digit ASCII code is
required, such as "7" ( to code a "BEEP") it must be entered as
"007" (07 is likewise acceptable).
Continuing on with the example, the next code "B" can be
selected by typing "B" (without quotes) followed by <ENTER> or by
typing its ASCII code "066" followed by <ENTER>. Similarly "5"
can be selected by typing "5" <ENTER> or by its ASCII code "053"
<ENTER>. Be careful when entering numerics as codes. Sometimes
manuals are not too clear on whether character 1, ASCII code 049
or ASCII code 001, the "smiling face" character is required. To
help alleviate this problem PNTRCODE displays the character if
possible, the hex code and the ASCII code so that proper coding
can be verified. Also be aware the 1 (one) and l (ell) and also
0 (zero) and O (capital oh) can be misread easily.
When the code sequence is complete, terminate the process by
an <ENTER> without any data. The screen will clear and the DOS
prompt will return. Normally two error messages, typically "File
not found" and "Batch file missing" may be seen but these
messages are normal and a part of the _.COM generation process.
Now display the directory and the desired _.COM file will be
listed (LEFTMARG.COM in this example).
This particular _.COM file could be checked as follows:
Generate a printout with normal setting by typing at the DOS
prompt "DIR >PRN" <ENTER>. This will print out the default
directory. Then type "LEFTMARG" <ENTER> to set the printer.
Then repeat "DIR >PRN" <ENTER>. That printout will be identical
except the new margin will be apparent.
NOTE: Most programs automatically reset the printer before
any printer output is produced. If the software does reset the
printer, any printer commands issued by the _.COM file before the
program was run will be erased. PNTRCODE is useful primarily for
printing ASCII text using DOS commands, although in some cases
the _.COM file may be of use when running software that normally
produces a printed output. It all depends upon the software
program and how the printer is setup within that software.
An ideal first trial run for PNTRCODE may be to generate a
RESET command (PRNRESET.COM, maybe) that can be used to return
the printer to the reset condition after printer codes for
special features have been issued. The proper reset code can be
found in the printer manual.
DISCLAIMERS, ETC
PNTRCODE is freely released to all interested parties.
There is no requirement or plea to register or license the
program. Similarly there is no guarantee, warranty or implied
responsibility by the author for this program and its use. So
take PNTRCODE and try it. If you like it, a donation of $5 to
the author would be much appreciated, a small reward for the
efforts to develop this user-friendly program from an earlier
very un-friendly concept.
Regards
FRED HARTMAN
"Ready Freddie's Utilities"
5677 High Meadow Drive
Norcross, GA 30092
August 15, 1992